#include <stdio.h>
#include <unistd.h>
#include <string.h>

int main(int argc, char* argv[])
{
	if (argc == 1)//传来的命令行参数的个数
	{
		printf("Usage: %s -[a, b, c, d]\n", argv[0]);
		return 0;
	}
	else if (strcmp(argv[1], "-a") == 0)
  {
    printf("this is function1\n");
  }	
	else if (strcmp(argv[1], "-b") == 0)
  {
    printf("this is function2\n");
  }

	else if (strcmp(argv[1], "-c") == 0)
  {
    printf("this is function3\n");
  }
	else if (strcmp(argv[1], "-d") == 0)
  {
    printf("this is function4\n");
  }
  else
  {
    printf("no this function!!\n");
  }
	
	






	//while (1)
	//{
	//	for (int i = 0; i < argc; i++)
	//	{
	//		printf("argv[%d]->%s\n", i, argv[i]);
	//	}
	//	sleep(1);
	//}
	return 0;
}
